 <?php 
 $madanhmucsp=$_GET['id'];
 ?>
<div id="main-content">
     <div id="sp_noibat">
        <?php 
            require_once('services/danhmucsanpham.php');
            $danhmucsanphamService = new DanhmucsanphamService();
            $item1 = $danhmucsanphamService->getTendanhmuc($madanhmucsp);  
            
        ?>
        <div class="tieudetrangchu"><h2><?php echo $item1['ten_danh_muc'] ?></h2></div>
        <div class="sp_noibat">
            <?php
                $sql='select * from tbl_san_pham where ma_danh_muc='.$madanhmucsp;
                $kq=tep_db_query($sql);
                while($item=tep_db_fetch_array($kq)){?>
                <div  class="hinhanhsanpham">
                   <div class="h_a"><a href=""><img src="<?php echo 'http://localhost/chuotlenshop/admin/upload/'.$item['hinh_anh'].'' ?>" width="218" height="177" border="1px" /></a></div>
                     <div class="tensp">
                        <p><a href=""><?php echo ''.$item['ten_san_pham'].'' ?></a></p>
                        <p><a href="">Giá : <?php echo ''.$item['gia'].'' ?> VNÐ</a></p>                                        
                        <p><a href="">NSX : <?php echo ''.$item['noi_san_xuat'].'' ?></a><p>
                        <p style="padding-top: 5px;"><a href="javascript:buyProduct(<?php echo $item['id'] ?>);"><img src="http://localhost/chuotlenshop/images/giohang.jpg" /></a><p>
                    </div>
                   </div>
            <?php        
                }
            ?>
        </div>
    </div>

</div>



